//
// Created by hkkzzxz on 24-9-9.
//

#include "EmployeeAttendance.h"

void EmployeeAttendance::FillFromRow(sql::ResultSet *rs) {
    checkInTime = rs->getString("check_in_time");
    checkOutTime = rs->getString("check_out_time");
    date = rs->getString("date");
    late = rs->getInt("late");
    leaveEarly = rs->getInt("leave_early");
}

const std::string &EmployeeAttendance::getCheckInTime() const {
    return checkInTime;
}

const std::string &EmployeeAttendance::getCheckOutTime() const {
    return checkOutTime;
}

const std::string &EmployeeAttendance::getDate() const {
    return date;
}

bool EmployeeAttendance::isLate() const {
    return late;
}

bool EmployeeAttendance::isLeaveEarly() const {
    return leaveEarly;
}
